/*
 * Votante.h
 *
 *  Created on: Oct 8, 2011
 *      Author: lore
 */

#ifndef VOTANTE_H_
#define VOTANTE_H_
#include <stdlib.h>
#include <iostream>
#include <sstream>
#include <string>
#include <vector>
using namespace std;


class Votante {
public:
	Votante();
	virtual ~Votante();

	void setDni(unsigned long dni);
	unsigned long getDni();

	void setNombreApellido(string nomyape);
	string getNombreApellido();

	//void setClave (unsigned long clave);
	//unsigned long getClave();
	void setClaveEncriptada (string clave);
	string getClaveEncriptada();

	void setDistritoId(unsigned long distrito);
	unsigned long getDistritoId();

	void setDomicilio(string);
	string getDomicilio();

	void removeAllElecciones();
	void addEleccion(unsigned long idEleccion);
	vector<unsigned long> getElecciones();
	void setEleccionesId(vector<unsigned long> ids);

	char* pack();
	unsigned long packLen();
	bool unpack(char* buffer, unsigned long bufferLen);

private:
		unsigned long dni;
		string nomyape;
		string clave;
		string domicilio;
		unsigned long distritoId;

		vector<unsigned long> idElecciones;
};


#endif /* VOTANTE_H_ */
